﻿<%@ Control Language="C#"  AutoEventWireup="true" CodeBehind="UCLHGaiHuTopInfo.ascx.cs" Inherits="Web.Controls.LAIHAN.UCLHGaiHuTopInfo" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<link href="/css/inputBgColor.css" rel="stylesheet" />
<script type="text/javascript">

    //打开文件列表
    function OpenWenjian(laihanbh, yonghuh) {

        openCenter("LAIHANWJLB.aspx?laihanbh=" + laihanbh + "&yonghuh=" + yonghuh, "700px", "380px");
    }
    //输入原用户号查询用户信息
    function SelectByUserNo()
    {       
        if (event.keyCode == 13) {
            setTimeout(function () {

            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            if (UCLHFenHuDJXX_YongHuH.GetText() == "") {
                alert("用户号不能为空");
                return;
            }
            UCLHFenHuDJXX_CallBack.PerformCallback("yonghuh");
        }
    }
    //输入新用户号获取合同号
    function YongHuH1_LostFocus() {
        if (txtYongHuH1.GetText().length == 7) {
            UCLHFenHuDJXX_CallBack.PerformCallback("hetongh");
        }
        else {
            txtYongHuH1.SetText("");
        }
    }
    function CallBackFunction(rs)
    {
        var arr = rs.split('|');
        var key = arr[0];
        var type = arr[1];
        var msg = arr[2];
       
        if (key == "yonghuh")
        {
            if (type == -3) {
                if (confirm(msg+",是否继续！？"))
                {
                    HiddenFieldList.Set("IsTrue", "1");
                    UCLHBtnBottom_hdCollection.Set("yonghuh", UCLHFenHuDJXX_YongHuH.GetText());
                    BtnSearchByUser.onClick();
                }
            }
            else if (type > 0) {
                UCLHBtnBottom_hdCollection.Set("yonghuh", UCLHFenHuDJXX_YongHuH.GetText());
                BtnSearchByUser.onClick();                
            }
            else {
                alert(msg);
                UCLHBtnBottom_hdCollection.Set("yonghuh", "");
                BtnClearInfo.onClick();
                
            }
        }
        else if (key == "hetongh") {
            txtHeTongH.SetText(arr[2]);
            return;
        }
    }
    function OpenWJLB() {
        if (HiddenFieldList.Get("YongHuH") == undefined)
        {
            alert("请先查询相关用户信息");
            UCLHFenHuDJXX_YongHuH.Focus();
            return;
        }
        var yonghuh = HiddenFieldList.Get("YongHuH");
       
        
        var laihanbh = "";
        if (HiddenFieldList.Get("LaiHanBH") != undefined)
        {
            laihanbh = HiddenFieldList.Get("LaiHanBH");
        }
        OpenWenjian(laihanbh,yonghuh);
    }
   
</script>

<div style="display:none">
    <dx:ASPxButton ID="BtnClear" ClientInstanceName="BtnClearInfo" runat="server" OnClick="BtnClear_Click" Text="ASPxButton" UseSubmitBehavior="false"></dx:ASPxButton>
    <dx:ASPxButton ID="BtnSearch" ClientInstanceName="BtnSearchByUser" OnClick="BtnSearch_Click" runat="server" Text="ASPxButton" UseSubmitBehavior="false"></dx:ASPxButton>
</div>
<dx:ASPxHiddenField ID="HiddenFieldList" ClientInstanceName="HiddenFieldList" runat="server"></dx:ASPxHiddenField>
<dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="UCLHFenHuDJXX_CallBack" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){CallBackFunction(e.result)}" runat="server"></dx:ASPxCallback>

<table style="">
    <tr>
        <td>登记文号：</td>
        <td>
            <dx:ASPxTextBox ID="txtLaiHanBH"  ReadOnly="true" runat="server" Width="100%"></dx:ASPxTextBox>
        </td>
        <td>用户号：</td>
        <td>
            <dx:ASPxTextBox ID="txtYongHuH" ClientInstanceName="UCLHFenHuDJXX_YongHuH" runat="server" Width="100%">
                <ClientSideEvents   KeyDown="function(s,e){SelectByUserNo();}" />
            </dx:ASPxTextBox>
        </td>
        
    </tr>
</table>
<fieldset style="border: 1px solid  cornflowerblue;">
    <legend><b>用户信息</b></legend>
    <table style="width: 100%">
        <tr>
            <td align="right" style="min-width: 75px; width:5%">新用户号：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtYongHuH1" runat="server" ClientInstanceName="txtYongHuH1">
                   <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtYongHuM1);}" LostFocus ="function(s,e){YongHuH1_LostFocus();}" />
                </dx:ASPxTextBox>
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td align="right">用户名：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtYongHuM1" ClientInstanceName="txtYongHuM1" runat="server"></dx:ASPxTextBox>
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td align="right">用户地址：
            </td>
            <td colspan="3">
                <dx:ASPxTextBox Width="100%" ID="txtDiZhi1" runat="server"></dx:ASPxTextBox>
            </td>
        </tr>
       
        <tr>
            <td align="right">局号：
            </td>
            <td >
                <dx:ASPxComboBox Width="100%" ID="dJuHao" runat="server" ValueType="System.String">
                    <ClientSideEvents SelectedIndexChanged="function(s,e){cmbGongSi1.PerformCallback();}" />
                </dx:ASPxComboBox>

            </td>
             <td align="right">行政区：
            </td>
            <td >
                <dx:ASPxComboBox Width="100%" ID="dXingZhengQ" runat="server" ValueType="System.String"></dx:ASPxComboBox>
            </td>
        </tr>
        <tr>
            <td align="right">公司号：
            </td>
            <td >
                <dx:ASPxComboBox Width="100%" ID="dGongSiH" ClientInstanceName="cmbGongSi1" OnCallback="dGongSiH_Callback" runat="server" ValueType="System.String"></dx:ASPxComboBox>

            </td>
            <td align="right">业务员：
            </td>
            <td >
                <dx:ASPxComboBox Width="100%" ID="dYeWuY" runat="server" ValueType="System.String"></dx:ASPxComboBox>

            </td>
        </tr>
       
        <tr>
            <td align="right">联系人：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtLianXiR" runat="server"></dx:ASPxTextBox>
            </td>
             <td align="right">联系电话：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtLianXiDH" runat="server"></dx:ASPxTextBox>
            </td>
        </tr>
       
        <tr>
            <td align="right">联系部门：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtLianXiBM1" runat="server"></dx:ASPxTextBox>
            </td>
            <td align="right">邮编：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtYouBian" runat="server"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            
        </tr>
        <tr>
            <td align="right">用水性质：
            </td>
            <td >
                <dx:ASPxComboBox Width="100%" ID="dYongShuiXZ" runat="server" ValueType="System.String"></dx:ASPxComboBox>

            </td>
             <td align="right">行业类别：
            </td>
            <td >
                <dx:ASPxComboBox Width="100%" ID="dHangYeLB" runat="server" ValueType="System.String"></dx:ASPxComboBox>

            </td>
        </tr>
       
        <tr>
            <td align="right">用水价：
            </td>
            <td style="min-width: 40px">
                <dx:ASPxTextBox Width="100%" ID="txtYongShuiJ" runat="server"></dx:ASPxTextBox>

            </td>
            <td align="right" style="min-width: 75px">考核复用：
            </td>
            <td>
                <dx:ASPxComboBox Width="100%" ID="dKaoHeFY" runat="server" ValueType="System.String"></dx:ASPxComboBox>

            </td>
        </tr>
        
        <tr>
            <td align="right">开户户名：
            </td>
            <td colspan="3">
                <dx:ASPxTextBox Width="100%" ID="txtKaiHuHM" runat="server"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td align="right">开户银行：
            </td>
            <td colspan="3">
                <dx:ASPxTextBox Width="100%" ID="txtKaiHuYH" runat="server"></dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td align="right">开户账号：
            </td>
            <td >
                <dx:ASPxTextBox Width="100%" ID="txtKaiHuZH" runat="server"></dx:ASPxTextBox>
            </td>
            <td align="right">托收：
            </td>
            <td >
                <dx:ASPxCheckBox ID="cTuoShou" runat="server"></dx:ASPxCheckBox>
            </td>
        </tr>
       
        <tr>
            <td align="right">合同号：
            </td>
            <td colspan="3">
                <dx:ASPxTextBox Width="100%" ID="txtHeTongH" ClientInstanceName="txtHeTongH" ClientEnabled="false" runat="server"></dx:ASPxTextBox>
            </td>
        </tr>
    </table>
</fieldset>
